package android.slc.mp.ui.page;

import androidx.fragment.app.FragmentActivity;

import android.slc.mp.model.MpVirtualVm;
import android.slc.mp.po.i.IBaseFolder;
import android.slc.mp.po.i.IBaseItem;
import android.slc.mp.po.i.IBaseResult;
import android.slc.mp.ui.SlcIMpDelegate;

import java.util.List;

/**
 * Created by slc
 * @param <S>
 * @param <F>
 * @param <T>
 */
public interface SlcMpPagerVirtualVm<S extends IBaseResult<F, T>, F extends IBaseFolder<T>, T extends IBaseItem> extends MpVirtualVm {
    void loader(FragmentActivity fragmentActivity);

    int getMediaType();

    SlcIMpDelegate getMediaPickerDelegate();

    void onResult(S result);

    S getResult();

    List<T> getCurrentMediaList();

    void setCurrentMediaList(List<T> mediaList);

    void onItemClick(int position);

    void onItemChildClick(int position);

    /**
     * 选择一个item调用此方法
     *
     * @param position
     * @return
     */
    boolean selectItem(int position);

    void setOnDataRefreshListener(OnResultListener<List<T>> onLoadCompatListener);

    interface OnResultListener<T> {
        void onLoadResult(T data);
    }
}
